export const columns = [
  { title: '序号', dataIndex: 'index', key: 'index', width: 50, fixed: 'left', align: 'center', customRender: ({ index }) => index + 1 },
  { title: '状态', dataIndex: 'status', key: 'status', width: 100, bodySlot: 'status', fixed: 'center' },
  { title: '公司名称', dataIndex: 'company', key: 'councompanyterparty', width: 180, ellipsis: true },
  { title: '产品名称', dataIndex: 'product', key: 'product', width: 120, ellipsis: true },
  { title: '规格（mm）', dataIndex: 'specification', key: 'specification', width: 100 },
  { title: '入库吨位', dataIndex: 'weight', key: 'weight', width: 200 },
  { title: '到货日期', dataIndex: 'arrivalDate', key: 'arrivalDate', width: 120 },
  { title: '榜单号', dataIndex: 'weighingNumber', key: 'weighingNumber', width: 150 },
  { title: '合同单价（不含税）', dataIndex: 'contractPrice', key: 'contractPrice', width: 150 },
  { title: '不合格项说明', dataIndex: 'deductDesc', key: 'deductDesc', width: 200, ellipsis: true },
  { title: '质扣比例', dataIndex: 'deductRatio', key: 'deductRatio', width: 150 },
  { title: '质扣金额（含税）', dataIndex: 'deductAmount', key: 'deductAmount', width: 150 },
  {
    title: '月份',
    dataIndex: 'month',
    key: 'month',
    width: 100,
    customRender: ({ text }) => {
      if (!text)
        return '-'
      const [year, month] = text.split('-')
      return `${year}年${month}月`
    },
  },
  { title: '操作', dataIndex: 'action', key: 'action', width: 80, bodySlot: 'action', fixed: 'right' },
]

export const statusData = [
  {
    label: '全部',
    value: 0,
    color: '#165Dff',
    query: null,
  },
  {
    label: '待匹配',
    value: 0,
    color: '#FB4246',
    query: 0,
  },
  {
    label: '已匹配',
    value: 0,
    color: '#03c683',
    query: 2,
  },
  {
    label: '已完成',
    value: 0,
    color: '#777777',
    query: 3,
  },
]
export const excelParam = {
  fileName: '质扣表模板.xlsx',
  downLoadUrl: 'http://192.168.1.99:9000/bee-mall/质扣表模板.xlsx',
  api: '/admin/qualityDeduct/import',
}
